]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Setting proper name and role for system menu sliders
authorAlejandro Piñeiro <apinheiro@igalia.com>
Wed, 21 Aug 2013 16:24:30 +0000 (18:24 +0200)
committerAlejandro Piñeiro <apinheiro@igalia.com>
Thu, 22 Aug 2013 15:18:33 +0000 (17:18 +0200)
https://bugzilla.gnome.org/show_bug.cgi?id=706391

js/ui/slider.js
js/ui/status/brightness.js
js/ui/status/volume.js

index e0e786759c733ab3c27102d9b9d53d3e24f2a5a7..ab90d61d2d59710286b37de7e37d3477aa756d1c 100644 (file)
@@ -5,6 +5,7 @@ const Clutter = imports.gi.Clutter;
 const Lang = imports.lang;
 const St = imports.gi.St;
 const Signals = imports.signals;
+const Atk = imports.gi.Atk;
 
 const SLIDER_SCROLL_STEP = 0.05; /* Slider scrolling step in % */
 
@@ -19,7 +20,8 @@ const Slider = new Lang.Class({
 
         this.actor = new St.DrawingArea({ style_class: 'slider',
                                           can_focus: true,
-                                          reactive: true });
+                                          reactive: true,
+                                          accessible_role: Atk.Role.SLIDER });
         this.actor.connect('repaint', Lang.bind(this, this._sliderRepaint));
         this.actor.connect('button-press-event', Lang.bind(this, this._startDragging));
         this.actor.connect('scroll-event', Lang.bind(this, this._onScrollEvent));
index 800a7f28a9deefecaa1aed79cef736ee15d66b8a..bd76972138f9f98b4ee7c83eeeca723ed15ee707 100644 (file)
@@ -39,6 +39,7 @@ const Indicator = new Lang.Class({
 
         this._slider = new Slider.Slider(0);
         this._slider.connect('value-changed', Lang.bind(this, this._sliderChanged));
+        this._slider.actor.accessible_name = _("Brightness");
 
         let icon = new St.Icon({ icon_name: 'display-brightness-symbolic',
                                  style_class: 'popup-menu-icon' });
index b696b1ae4f33d18af02b17fbac7047bcc81dacfd..2b3ac0c6b0ef87fe6adf9a06fbd9af366ddcd0e4 100644 (file)
@@ -157,6 +157,11 @@ const OutputStreamSlider = new Lang.Class({
     Name: 'OutputStreamSlider',
     Extends: StreamSlider,
 
+    _init: function(control) {
+        this.parent(control);
+        this._slider.actor.accessible_name = _("Volume");
+    },
+
     _connectStream: function(stream) {
         this.parent(stream);
         this._portChangedId = stream.connect('notify::port', Lang.bind(this, this._portChanged));
@@ -205,6 +210,7 @@ const InputStreamSlider = new Lang.Class({
 
     _init: function(control) {
         this.parent(control);
+        this._slider.actor.accessible_name = _("Microphone");
         this._control.connect('stream-added', Lang.bind(this, this._maybeShowInput));
         this._control.connect('stream-removed', Lang.bind(this, this._maybeShowInput));
         this._icon.icon_name = 'audio-input-microphone-symbolic';